from django.conf.urls import url
from django.contrib import admin
from app01 import views
urlpatterns = [
    url(r'^login/',views.login,name='login'),
    url(r'^register/',views.register,name='register'),
    url(r'^customer/',views.Customer.as_view(),name='customer'),
    url(r'^my_customer/',views.Customer.as_view(),name='my_customer'),
    url(r'^page/',views.page,name='page'),
    url(r'^customer_add/',views.customerFrom,name='customerFrom'),
    url(r'^customer_edit/(\d+)',views.customerFrom,name='customer_edit'),
    #展示所有的跟进记录
    url(r'^consultrecord/$',views.ConsultRecord.as_view(),name='consultrecord'),
    #展示某个客户的跟进记录
    url(r'^consultrecord/(?P<customer_id>\d+)',views.ConsultRecord.as_view(),name='one_consultrecord'),


    url(r'^consul_add/',views.consultFrom,name='consultFrom'),
    url(r'^consul_edit/(\d+)',views.consultFrom,name='consul_edit'),

    url(r'^enrollment/$',views.Enrollment.as_view(),name='enrollment'),
    url(r'^enrollment/(?P<customer_id>\d+)',views.Enrollment.as_view(),name='one_enrollment'),

    url(r'^enroll_add/(?P<customer_id>\d+)',views.enrollFrom,name='enrollFrom'),
    url(r'^enroll_edit/(?P<pk>\d+)', views.enrollFrom, name='enroll_edit'),


    url(r'^paymentrecord/', views.Paymentrecord.as_view(), name='paymentrecord'),
    url(r'^payment_add/', views.paymentFrom, name='paymentFrom'),
    url(r'^payment_edit/(\d+)', views.paymentFrom, name='payment_edit'),


    url(r'^classlist/', views.Classlist.as_view(), name='classlist'),
    url(r'^classlist_add/', views.classForm, name='classForm'),
    url(r'^classlist_edit/(\d+)', views.classForm, name='classlist_edit'),


    url(r'^courserecord/(?P<class_id>\d+)/', views.Courserecord.as_view(), name='courserecord'),
    url(r'^courserecord_add/(?P<class_id>\d+)/', views.courseForm, name='courseForm'),
    url(r'^courserecord_edit/(?P<pk>\d+)/', views.courseForm, name='courserecord_edit'),


    url(r'^studyrecord/(?P<courserecord_id>\d+)/', views.studentForm, name='studyrecord'),

]
